<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="box">
    你好，我的名子叫<span id="span">frank</span>，我今年18了
</div>
<script>
    /*
    找到要删除的元素
    通远删除无素父元素的方法 removeChild(指定子元素)
     */
//    var spanObj = document.getElementById('span');
//    var boxObj = document.getElementById('box');
//    boxObj.removeChild(spanObj)

    var spanObj = document.getElementById('span');
//    spanObj.parentNode.removeChild(span);

//spanObj.parentNode.innerHTML = '好'
//spanObj.innerHTML = ''
//spanObj.outerHTML = ''

</script>


</body>
</html>